inner = 'window'

function say() {
    console.log(inner, this.inner)
}

let obj1 = function(){
    var inner = '1-1'
    return {
        inner: '1-2',
        say: function() {
            console.log(inner, this.inner);
        }
    }
}

let obj2 = function(){
    var inner = '2-1'
    return {
        inner: '2-2',
        say: function() {
            console.log(inner, this.inner);
        }
    }
}

say()
obj1().say()
obj2().say()
obj1().say = say
obj1().say()
obj1().say = obj2().say
obj1().say()
